package com.blacktea.structuralpatterns.flyweightpattern;

import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * @description: 实现享元接口
 * @author: black tea
 * @date: 2023/3/23 14:00
 */
@AllArgsConstructor
@Slf4j
public class ConcreteFlyweight implements Flyweight {

    private final String intrinsicState;

    @Override
    public void operation(String extrinsicState) {
        log.info("内部状态：{}", intrinsicState);
        log.info("外部状态：{}", extrinsicState);
    }

}
